﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tsingda.CacheModule
{
    interface ICache
    {
        /// <summary>
        /// 缓存对象中是否存在key的缓存项
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool Container(string key);
        /// <summary>
        /// 向缓存中添加内容
        /// </summary>
        /// <param name="key"></param>
        /// <param name="memo"></param>
        /// <param name="minutes">缓存的时间(单位:分钟)</param>
        void Add(string key, object memo, int minutes);
        /// <summary>
        /// 移除指定的缓存项
        /// </summary>
        /// <param name="key"></param>
        void Remove(string key);
        /// <summary>
        /// 获取指定的缓存项
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object Get(string key);

        /// <summary>
        /// 输出缓存信息
        /// </summary>
        /// <param name="?"></param>
        void Write(System.Web.HttpApplication application, string key);
        /// <summary>
        /// 缓存文件保存的地址
        /// </summary>
        string StringRootPath{get;set;}
    }
}
